package com.example.yeb.yebserver.controller;


import com.baomidou.mybatisplus.extension.api.R;
import com.example.yeb.yebserver.config.ResultVO;
import com.example.yeb.yebserver.entity.TAdmin;
import com.example.yeb.yebserver.service.TAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author MC鹏浩
 * @since 2021-03-08
 */
@RestController
@RequestMapping("/t-admin")
public class TAdminController {

    @Autowired
    private TAdminService adminService;

    @GetMapping
    public ResultVO<List<TAdmin>> selectAdminList(){

        List<TAdmin> tAdmins = adminService.selectAdminByUser();
        return ResultVO.success(tAdmins);
    }

}

